# Contributor: omni <omni+alpine@hack.org>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=py3-tabulate
pkgver=0.9.0
pkgrel=2
pkgdesc="Pretty-print tabular data"
url="https://github.com/astanin/python-tabulate"
arch="noarch"
license="MIT"
depends="python3 py3-wcwidth"
makedepends="py3-setuptools_scm py3-gpep517 py3-wheel"
checkdepends="py3-nose py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/t/tabulate/tabulate-$pkgver.tar.gz"
builddir="$srcdir/tabulate-$pkgver"

replaces=py-tabulate # Backwards compatibility
provides=py-tabulate=$pkgver-r$pkgrel # Backwards compatibility

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONPATH="$PWD" pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
042a6b34ea6e5b6324cb40112b3078b62e6f1f6186401262e7b06a5b96dd118d4b70e259a96121e383ac1fe53f3953c27532206af9825b97db9f41fe1e5f3934  tabulate-0.9.0.tar.gz
"
